home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0833.dms / q0833.adf / FlowChartMacros / FlowChartTool_Text.arexx < prev    next >
Text File  |  1997-04-10  |  3KB  |  102 lines

  1. /* FlowChartTool_Text */
  2. /* A SuperMacro by Steven. R. Giovenella, 5823 Dutchess Dr., Colorado Springs, CO 
  3. 80918.  © Copyright 1994 Steven. R. Giovenella, All rights reserved. 
  4. This macro is my gift to the Amiga community.  It may be given away freely to 
  5. anyone, but it may NOT be sold in any way, shape, or form, not even for the cost of 
  6. reproduction, shipping, or handling, without express written permission from the 
  7. author.  This macro may NOT be added to any disk which is to be sold for any price 
  8. or fee, to include shipping and handling.  The ONLY way this macro may be 
  9. distributed is on a disk which is given away 100% free of all charges, or via 
  10. telecommunications networks which do not charge any additional fee as a result of a 
  11. user downloading this particular macro, although general fees for access to the 
  12. telecommunications system as a whole are acceptable.  This macro may only 
  13. bereproduced in its entirety, including all comment lines and code.  The individual 
  14. user may alter this macro for personal use, but may not then distribute the macro 
  15. in any modified form.  If you wish, feel free to send me some money, a Christmas 
  16. card, some other piece of software, or absolutely nothing as a gift for creating this 
  17. macro.  The author of this software is not responsible for any data loss or damage to 
  18. computer equipment as a result, direct or indirect, of the use of this macro. */
  19.  
  20. Options results
  21.  
  22. /* Set maxwidth of box margins */
  23. SectionSetup TOP 1 BOTTOM 1 INSIDE 2.25 OUTSIDE 2.25 COLUMNS 4
  24. Justify CENTER
  25. Hypen  ON
  26. Hotzone .05
  27.  
  28. /* Find Range to Use */
  29. Status LinePos
  30.     PARSE VAR Result BegLine BegPos EndLine EndPos
  31.  
  32. maxwidth=0
  33. cumheight=0
  34. range=EndLine-BegLine+1
  35.  
  36. DO i=1 to range
  37.     linenum=BegLine+i-1
  38.     MoveToLine linenum 0
  39.     Status LineHeight
  40.         lh=Result*2
  41.     Status Fontname
  42.         fname=Result
  43.     Status FontSize
  44.         fsize=Result
  45.     TextBlockTypePrefs SIZE fsize FONT fname
  46.     ShiftDOWN
  47.     CtrlDOWN
  48.     Cursor DOWN
  49.     Extract
  50.         textline=Result
  51.     ShiftUP
  52.     CtrlUP
  53.     yspot=.25+cumheight
  54.     xspot=1.75
  55.     DrawTextBlock 1 xspot yspot textline
  56.     cumheight=cumheight+lh    
  57.     IF i=1 THEN DO
  58.         FirstObject SELECTED
  59.             firstobj=Result
  60.         END
  61.     END
  62.  
  63.  
  64.  
  65. newcumheight=0
  66. DO i=1 to range
  67.     obj=firstobj+i-1
  68.     GetObjectCoords obj
  69.         PARSE VAR Result page left top width height
  70.     newxpos=4.25-.5*width
  71.     newypos=.5+newcumheight
  72.     newcumheight=height+newcumheight
  73.     SetObjectCoords obj page newxpos newypos width height
  74.     END
  75.  
  76. GraphicTool
  77. SelectObject firstobj
  78. DO i=1 to (range-1)
  79.     NextObject
  80.     SelectObject Result MULTIPLE
  81.     END
  82. Group
  83. Cut
  84.  
  85. MoveToLine BegLine 0
  86. TextTool
  87.  
  88. /* Paste into FlowChart section */
  89. /* Goto FlowChart section or create one */
  90. SectionSetup NEWNAME "Main"
  91. GotoSection "FlowChart"
  92. GetSectionSetup NAME 
  93. IF Result~="FlowChart" THEN DO
  94.     NewSection Text Name "FlowChart" AFTER
  95.     GotoSection "FlowChart"
  96.     END
  97.  
  98. Paste
  99. GraphicTool
  100. redraw
  101.  
  102.